package com.io.zx;

import java.io.Serializable;

public class SanGuo implements Serializable,Comparable<SanGuo> {
	
	private int id;
	private String name;
	private double math;
	private double chinese;
	private double english;
	
	
	public SanGuo(int id, String name, double math, double chinese, double english) {
		super();
		this.id = id;
		this.name = name;
		this.math = math;
		this.chinese = chinese;
		this.english = english;
	}
	

	public SanGuo() {
		super();
	}


	@Override
	public String toString() {
		return "SanGuo [id=" + id + ", name=" + name + ", math=" + math + ", chinese=" + chinese + ", english="
				+ english + "]";
	}


	@Override
	public int compareTo(SanGuo o) {
		// TODO Auto-generated method stub
		if(this.id>o.id) {
			return 1;
		}
		else if(this.id==o.id) {
			return 0;
		}
		else {
			return -1;
		}
		
	}


	

}
